home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / util / virus / xvs33_12.lha / xvs.doc < prev    next >
Text File  |  1998-09-27  |  13KB  |  465 lines

  1. TABLE OF CONTENTS
  2.  
  3. xvs.library/xvsAllocObject
  4. xvs.library/xvsCheckBootblock
  5. xvs.library/xvsCheckFile
  6. xvs.library/xvsCheckSector
  7. xvs.library/xvsCreateVirusList
  8. xvs.library/xvsFreeObject
  9. xvs.library/xvsFreeVirusList
  10. xvs.library/xvsInstallBootblock
  11. xvs.library/xvsObjectType
  12. xvs.library/xvsRepairFile
  13. xvs.library/xvsRepairSector
  14. xvs.library/xvsSelfTest
  15. xvs.library/xvsSumBootblock
  16. xvs.library/xvsSurveyMemory
  17.  
  18. xvs.library/xvsAllocObject                         xvs.library/xvsAllocObject
  19.  
  20.    NAME
  21.     xvsAllocObject -- Allocate memory for specified object.
  22.  
  23.    SYNOPSIS
  24.     object = xvsAllocObject(objecttype)
  25.       D0          -48           D0
  26.  
  27.     APTR xvsAllocObject(ULONG);
  28.  
  29.    FUNCTION
  30.     Allocates a memory block and required resources for the specified
  31.     object. Never do this in any other way for compatibility with
  32.     library updates.
  33.  
  34.     Objecttype can be one of these:
  35.     XVSOBJ_BOOTINFO    - allocate a xvsBootInfo structure.
  36.     XVSOBJ_FILEINFO    - allocate a xvsFileInfo structure.
  37.     XVSOBJ_MEMORYINFO  - allocate a xvsMemoryInfo structure.
  38.     XVSOBJ_SECTORINFO  - allocate a xvsSectorInfo structure.
  39.  
  40.    INPUTS
  41.     objecttype - One of the XVSOBJ_#? values.
  42.  
  43.    RESULT
  44.     object - Pointer to the object or NULL if there occured an error.
  45.  
  46.    SEE ALSO
  47.     xvsFreeObject()
  48.  
  49. xvs.library/xvsCheckBootblock                   xvs.library/xvsCheckBootblock
  50.  
  51.    NAME
  52.     xvsCheckBootblock -- Check bootblock contents for viruses.
  53.  
  54.    SYNOPSIS
  55.     result = xvsCheckBootblock(bootinfo)
  56.       D0            -66           A0
  57.  
  58.     ULONG xvsCheckBootblock(struct xvsBootInfo *);
  59.  
  60.    FUNCTION
  61.     Checks if a bootblock contains viruses and informs about the
  62.     dostype, checksum and type of the bootblock.
  63.  
  64.     xvsbi_Bootblock must be initialized with a pointer to a 1024 bytes
  65.     bootblock.
  66.  
  67.     The bootblock will be first checked for the dostype. If it's not
  68.     a DOS bootblock, you'll receive XVSBT_NOTDOS as a result.
  69.     Otherwise xvsbi_DosType will receive the type of filesystem the
  70.     disk is using (eg. DOS/0 -> xvsbi_DosType = 0).
  71.     The xvsbi_ChkSumFlag field will be TRUE if the bootblock checksum
  72.     is correct (ie. bootable), otherwise it's FALSE.
  73.  
  74.     Now the bootblock will be checked for standard bootblocks and
  75.     viruses. You'll receive XVSBT_STANDARD13, XVSBT_STANDARD20 or
  76.     XVSBT_VIRUS in that case.
  77.  
  78.     If all the tests were negative, XVSBT_UNKNOWN is returned. Note
  79.     that XVSBT_UNINSTALLED will never be returned by this function,
  80.     it is only used by xvsInstallBootblock(). You can consider an
  81.     unknown bootblock with xvsbi_ChkSumFlag set to FALSE as uninstalled.
  82.  
  83.     In all cases, you'll receive the result in xvsbi_BootType too
  84.     and a describing ascii text in xvsbi_Name.
  85.  
  86.    INPUTS
  87.     bootinfo - Pointer to initialized xvsBootInfo structure.
  88.  
  89.    RESULT
  90.     result   - One of the XVSBT_#? values.
  91.  
  92. xvs.library/xvsCheckFile                             xvs.library/xvsCheckFile
  93.  
  94.    NAME
  95.     xvsCheckFile -- Check file contents for viruses.
  96.  
  97.    SYNOPSIS
  98.     result = xvsCheckFile(fileinfo)
  99.       D0         -96         A0
  100.  
  101.     ULONG xvsCheckFile(struct xvsFileInfo *);
  102.  
  103.    FUNCTION
  104.     Checks any file (executable/data) for virus infection and informs
  105.     about the type of file.
  106.  
  107.     xvsfi_File must be supplied with a pointer to the buffer holding
  108.     the file, xvsfi_FileLen must receive the length of the file.
  109.  
  110.     The file will be first checked if it's executable. If not, it's
  111.     a data file and will be scanned for data viruses (eg. scripts,
  112.     bootblocks). If nothing is found, the result is XVSFT_DATAFILE,
  113.     otherwise you'll receive XVSFT_DATAVIRUS. Such files can only be
  114.     deleted.
  115.  
  116.     Executable files are tested for link- and fileviruses. The result
  117.     for linkviruses is XVSFT_LINKVIRUS, you can repair these files with
  118.     a call to xvsRepairFile(). Fileviruses return XVSFT_FILEVIRUS and
  119.     the file can only be deleted completely.
  120.  
  121.     In all cases, you'll receive the result in xvsfi_FileType too
  122.     and a describing ascii text in xvsfi_Name.
  123.  
  124.     After calling this function, always test xvsfi_ModifiedFlag. If
  125.     this is TRUE, the recognition code modified your file buffer and
  126.     it's no longer safe to write it back to disk, execute it etc.
  127.     Some viruses require a lot of decrypt work for recognition and
  128.     it's not possible to detect them without, that's why I had to
  129.     add this flag.
  130.  
  131.    INPUTS
  132.     fileinfo - Pointer to initialized xvsFileInfo structure.
  133.  
  134.    RESULT
  135.     result   - One of the XVSFT_#? values.
  136.  
  137.    SEE ALSO
  138.     xvsRepairFile()
  139.  
  140. xvs.library/xvsCheckSector                         xvs.library/xvsCheckSector
  141.  
  142.    NAME
  143.     xvsCheckSector -- Check disk sector contents for virus modifications.
  144.  
  145.    SYNOPSIS
  146.     result = xvsCheckSector(sectorinfo)
  147.       D0          -84           A0
  148.  
  149.     ULONG xvsCheckSector(struct xvsSectorInfo *);
  150.  
  151.    FUNCTION
  152.     Checks if a sector has been modified by viruses.
  153.  
  154.     xvssi_Sector must be initialized with a pointer to a 512 bytes
  155.     disk sector, xvssi_Key with the sector number it has on disk.
  156.  
  157.     The sector will be checked for damages or changes done by viruses.
  158.     If anything is found, XVSST_DESTROYED or XVSST_INFECTED will be
  159.     returned, otherwise you'll receive XVSST_UNKNOWN.
  160.  
  161.     In all cases, you'll receive the result in xvssi_SectorType too
  162.     and a describing ascii text in xvssi_Name.
  163.  
  164.    INPUTS
  165.     sectorinfo - Pointer to initialized xvsSectorInfo structure.
  166.  
  167.    RESULT
  168.     result     - One of the XVSST_#? values.
  169.  
  170.    SEE ALSO
  171.     xvsRepairSector()
  172.  
  173. xvs.library/xvsCreateVirusList                 xvs.library/xvsCreateVirusList
  174.  
  175.    NAME
  176.     xvsCreateVirusList -- Allocate and initialize xvsVirusList structure.
  177.  
  178.    SYNOPSIS
  179.     viruslist = xvsCreateVirusList(listtype)
  180.        D0              -36            D0
  181.  
  182.     struct xvsVirusList *xvsCreateVirusList(ULONG);
  183.  
  184.    FUNCTION
  185.     Allocates memory for a xvsVirusList structure and initializes it
  186.     with nodes of the required type.
  187.  
  188.     Listtype can be one of these:
  189.     XVSLIST_BOOTVIRUSES  - create list of bootblock viruses.
  190.     XVSLIST_FILEVIRUSES  - create list of file viruses.
  191.     XVSLIST_LINKVIRUSES  - create list of link viruses.
  192.  
  193.     The list should be used for information purposes only, eg. for a
  194.     listview gadget of gadtools.library.
  195.     xvsVirusList->LH_TYPE holds the XVSLIST_#? value,
  196.     xvsVirusList->xvsvl_Count holds the amount of nodes.
  197.     The nodes themselves hold a pointer to the virus name in the
  198.     LN_NAME field.
  199.  
  200.    INPUTS
  201.     listtype - One of the XVSLIST_#? values.
  202.  
  203.    RESULT
  204.     viruslist - Pointer to xvsVirusList or NULL if not enough memory.
  205.  
  206.    SEE ALSO
  207.     xvsFreeVirusList()
  208.  
  209. xvs.library/xvsFreeObject                           xvs.library/xvsFreeObject
  210.  
  211.    NAME
  212.     xvsFreeObject -- Release memory of object.
  213.  
  214.    SYNOPSIS
  215.     xvsFreeObject(object)
  216.          -54        A1
  217.  
  218.     void xvsFreeObject(APTR);
  219.  
  220.    FUNCTION
  221.     Deallocates the memory and releases the resources reserved via
  222.     xvsAllocObject().
  223.  
  224.    INPUTS
  225.     object - Pointer to object.
  226.  
  227.    RESULT
  228.     None.
  229.  
  230.    SEE ALSO
  231.     xvsAllocObject()
  232.  
  233. xvs.library/xvsFreeVirusList                     xvs.library/xvsFreeVirusList
  234.  
  235.    NAME
  236.     xvsFreeVirusList -- Release memory of xvsVirusList structure.
  237.  
  238.    SYNOPSIS
  239.     xvsFreeVirusList(viruslist)
  240.           -42            A1
  241.  
  242.     void xvsFreeVirusList(struct xvsVirusList *);
  243.  
  244.    FUNCTION
  245.     Deallocates the memory of a xvsVirusList structure that has been
  246.     returned as result by xvsCreateVirusList().
  247.  
  248.    INPUTS
  249.     viruslist - Pointer to a xvsVirusList structure.
  250.  
  251.    RESULT
  252.     None.
  253.  
  254.    SEE ALSO
  255.     xvsCreateVirusList()
  256.  
  257. xvs.library/xvsInstallBootblock               xvs.library/xvsInstallBootblock
  258.  
  259.    NAME
  260.     xvsInstallBootblock -- Install some standard bootblocks to buffer.
  261.  
  262.    SYNOPSIS
  263.     xvsInstallBootblock(bootblock, boottype, dostype)
  264.             -72            A0         D0        D1
  265.  
  266.     void xvsInstallBootblock(APTR, ULONG, ULONG);
  267.  
  268.    FUNCTION
  269.     Installs desired bootblock data to the buffer. The checksum will
  270.     be corrected automatically except for XVSBT_UNINSTALLED bootblocks.
  271.  
  272.     Boottype can be one of these:
  273.     XVSBT_UNINSTALLED - creates uninstalled (non-bootable) bootblock.
  274.     XVSBT_STANDARD13  - creates standard bootblock (Kickstart 1.3).
  275.     XVSBT_STANDARD20  - creates standard bootblock (Kickstart 2.0).
  276.  
  277.     Dostype specifies the filesystem the disk is using. It's just
  278.     the trailing number behind 'DOS', eg. DOS/0 -> dostype = 0.
  279.  
  280.    INPUTS
  281.     bootblock - Pointer to buffer that is 1024 bytes long.
  282.     boottype  - One of the XVSBT_#? values above.
  283.     dostype   -